home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_iis.asp < prev    next >
Encoding:
Text File  |  1999-06-03  |  2.6 KB  |  106 lines

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4.  
  5. <!--#include file="default.str"-->
  6. <!--#include file="iis.str"-->
  7. <!--#include file="iisetfnt.inc"-->
  8.  
  9. <% 
  10. On Error Resume Next
  11. %>
  12.  
  13. <% if Request("Session") = "none" then%>
  14.     <FONT FACE='<%= L_DEFTEXTFONT_TEXT %>' SIZE='<%= L_DEFFONTPOINT %>'>
  15.     <%=  L_TIMEOUT_TEXT %>
  16.     <P>
  17.     <%= L_REFRESH_TEXT %>    
  18.     </FONT>
  19. <% else %>
  20.  
  21. <%
  22. Dim currentobj, infoobj
  23. Dim adminserver, lasterr, cont, logonfailure, thisinst, adminobj
  24.  
  25. ' check for our session vars... if they are missing we need to regrab from the cookies...
  26. %>
  27. <% if Session("Browser") = "" or  Session("FONTSIZE") = "" then %>
  28. <%        Response.write ("<META HTTP-EQUIV='Refresh' CONTENT='0;URL=default.asp'>") %>
  29. <% else %>
  30. <%    
  31.  
  32.     Dim adminpath
  33.     dim debug
  34.     debug = False
  35.     adminpath = "IIS://localhost/w3svc/"+Request.ServerVariables("INSTANCE_ID")
  36.  
  37.     if debug then
  38.         Response.write Request.ServerVariables("AUTH_USER") & "<BR>"
  39.         Response.write Request.ServerVariables("AUTH_PASSWORD") & "<BR>"
  40.         Response.write adminpath & "<BR>"
  41.     end if
  42.     Set currentobj=GetObject(adminpath)    
  43.     lasterr = err
  44.  
  45.     if err = &H800401E4 or err = 70 then        
  46.         Response.Status = "401 access denied"
  47.         cont = False
  48.         logonfailure = True
  49.     else
  50.         if err=0 then     
  51.             cont=True
  52.         else
  53.             cont=False
  54.             logonfailure = False
  55.         end if
  56.     end if
  57.  
  58.     %>
  59.     
  60.     <% if cont then %>
  61.     
  62.         <%
  63.         dim w3svc, site
  64.         Set infoobj=GetObject("IIS://localhost/w3svc/info")
  65.         if (Request.ServerVariables("INSTANCE_ID")=infoobj.AdminServer) then
  66.             Set w3svc = GetObject("IIS://localhost/w3svc")        
  67.             if err = &H800401E4 or err = 70 then
  68.                 Session("isAdmin")=False
  69.             else
  70.                 Session("isAdmin") = True
  71.             end if
  72.         else
  73.             Session("isAdmin")=false
  74.         end if
  75.         if debug then
  76.             Response.write err
  77.         end if
  78.         %>    
  79.         <HTML>
  80.         <HEAD>
  81.         <TITLE><%= L_ISM_TEXT %></TITLE>        
  82.         </HEAD>        
  83.             <FRAMESET ROWS="<%= iVScale(20) %>,*,<%= iVScale(0)%>" FRAMEBORDER="no" BORDER=0 FRAMESPACING=0>        
  84.                 <FRAME SRC="iihd.asp" NAME="title" SCROLLING="no" MARGINHEIGHT=0 MARGINWIDTH=0 BORDER=0 FRAMEBORDER=0 FRAMESPACING=0>        
  85.                 <FRAME SRC="blank.htm" NAME="body" MARGINHEIGHT=0 MARGINWIDTH=0 BORDER=0 FRAMEBORDER=0 FRAMESPACING=0>
  86.                 <FRAME SRC="blank.htm" NAME="connect" FRAMEBORDER=0 FRAMESPACING=0 SCROLLING="no">        
  87.             </FRAMESET>        
  88.         </HTML>
  89.     <% else %>
  90.         <% if not logonfailure then %>
  91.         <HTML>
  92.         <BODY>
  93.             <%= L_NOADSI_TEXT %>        
  94.             <P>    
  95.             <%= L_ERROR_TEXT %><B><%= err %> <%= err.description %></B>
  96.         </BODY>
  97.         </HTML>
  98.         <% end if %>
  99.     
  100.     <% end if %>
  101.  
  102. <% end if %>
  103.  
  104. <% end if %>
  105.  
  106.